  <template>
    <view class="page-carnumber-test">
      <view class="number-wrap">
        <car-number v-model="carNumber"></car-number>
      </view>
	  <view class="footer">
	  	<view class="footer_btn bg-primary white text-center" @click="sureNum">确定</view>
	  </view>
    </view>
  </template>

  <script>
    import CarNumber from '@/components/codecook-carnumber/codecook-carnumber.vue';
	import {currentPage} from '@/utils/tools.js'
    export default {
      components: {
        CarNumber
      },
      data() {
        return {
          carNumber: '',
        }
      },
      watch: {
        carNumber(num) {
   
        },
      },
	  onLoad(option) {
	  	let {value} = option;
	
		if(typeof value == "string"){
			this.carNumber = decodeURI(value) ;
		}
	  },
      methods: {
		  sureNum(){
			  let pages = getCurrentPages();
			  let beforePage = pages[pages.length - 2];
			  beforePage.$vm.info.licence = this.carNumber;
			  
			  uni.navigateBack({
			  	
			  })
		  }
      },
      beforeMount() {
      },
    }
  </script>  

  <style scoped lang="less">
    .number-wrap {
      padding: 30rpx;
    }
	.footer{
		padding: 10upx 30upx;
	}
	.footer_btn{
		padding: 20upx 0;
		border-radius: 5000upx;
	}
  </style>